package com.pmcc.core.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 管理平台用户
 * Created by tomas on 2020/9/5.
 */
@Entity
@Table(name = "sys_authority")
public class Authority extends UUIDEntity{
    @Column(name = "name")
    private String name;//名称
    @Column(name = "user_name", length = 50, unique = true)
    private String userName;//用户名
    @Column(name = "password")
    private String password;//密码
    @Column(name = "role_id")
    private String roleId;//角色id
    @Column(name = "create_time")
    private Date createTime;//创建时间
    @Column(name = "del_flag")
    private Integer delFlag;//删除标记

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }
}
